import env from '../env';
import * as http from '../http.js'

const baseUrl = env.apiUrl;

/**
 * requestLoading:请求加载动画，默认为false，产品要求
 * requestErrorToast:请求错误弹框,默认为true
 */
export function req(reqUrl, data = {}, method = 'post', requestLoading = false, requestErrorToast = true) {
	return http.request(`${baseUrl}${reqUrl}`, data, method, requestLoading, requestErrorToast)
}